pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let mut flag = false;
    let mut s = String::new();
    let mut from_base = 0;
    for c in num_str.chars() {
        if flag == false {
            if c == '('  {
                flag = true;
            } else {
                s.push(c);
            }
        } else {
            if c == ')' {
                break;
            } else {
                from_base = from_base * 10 + c.to_digit(10).unwrap();
            }
        }
    }
    let mut sum = 0;
    for c in s.chars() {
        let digit = c.to_digit(from_base).unwrap();
        sum = sum * from_base + digit;
    }
    let mut result = String::new();
    while sum > 0 {
        let digit = sum % to_base;
        sum = sum / to_base;
        let c = std::char::from_digit(digit, to_base).unwrap();
        result.push(c);
    }
    result = result.chars().rev().collect();
    result
}
